<div class="row">
<div class="button-container mb10">
	<?php echo CHtml::link('添加数据字典',$this->createUrl('dictionary/create'),array('class'=>'button'));?>
</div>
<?php
//获取字段语言包
$aAttributeLabels = BaseDictionaryModel::model()->attributeLabels();
?>
<table class="table table-bordered table-striped">
	<thead>
        <tr>
            <th class="bl0 tc" style="width:50px;"><input type="checkbox" class="btn_all" /> <?php echo $aAttributeLabels['did'] ?></th>
            <th><?php echo $aAttributeLabels['name'] ?></th>
            <th><?php echo $aAttributeLabels['table_name'] ?></th>
            <th><?php echo $aAttributeLabels['code'] ?></th>                    
            <th><?php echo $aAttributeLabels['isedit'] ?></th>                    
            <th style="width:200px;">操作</th>
        </tr>
	</thead>
	<?php foreach ($model as $v){?>
    <tr title="id=<?php echo $v->did;?>">
        <td><input type="checkbox" class="ids" name="ids[]" value="<?php echo $v->did;?>" /></td>
        <td><?php echo $v->name;?></td>
        <td><?php echo $v->table_name;?></td>
        <td><?php echo $v->code;?></td>
        <td>
        <?php 
            if($v->isedit==1){
            	echo '允许';
            }else{
            	echo '<font color="red">不允许</font>';
            }
        ?>
        </td>
        <td>
        	<?php
        		echo CHtml::link('添加选项',$this->createUrl('dictionary/addoption',array('did'=>$v->did)) ,array('class'=>'table-operate-a'));
        		echo CHtml::link('选项管理',$this->createUrl('dictionary/indexoption',array('did'=>$v->did)),array('class'=>'table-operate-a'));
        		echo CHtml::link('编辑',$this->createUrl('dictionary/update',array('did'=>$v->did)),array('class'=>'table-operate-a'));
        		echo CHtml::link('删除','javascript:void(0);', array('class'=>'delete table-operate-a' ,'url'=>$this->createUrl('dictionary/delete',array('did'=>$v->did))));
        	?>
        </td>
    </tr>
   	<?php }?>
</table>
<div class="table-bottom-operate">
    <div class="inline pull-left table-operate">
        <?php echo CHtml::link('删除','javascript:void(0);',array('class'=>'button button-primary deleteall','url'=>$this->createUrl('dictionary/deleteall'))); ?>
    </div>
    <div class="inline pull-right page">
        <?php $this->widget('LinkPager',array('pages' => $pages)); ?>
    </div>
	
</div>
</div>